package com.etc.ser.extenal;

import java.io.*;

/**
 * @author: knowno
 * @create: 2024-09-12 11:24
 * @Version 1.0
 **/
public class TestUser {
    public static void main(String[] args) throws IOException, ClassNotFoundException {

        User user = new User("1001","admin","123456");


//        OutputStream outputStream = new FileOutputStream("d:\\demo\\user2.ini");
//        ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
//        user.writeExternal(objectOutputStream);

        InputStream inputStream = new FileInputStream("d:\\demo\\user2.ini");
        ObjectInputStream objectInputStream = new ObjectInputStream(inputStream);

        user.readExternal(objectInputStream);



    }
}
